<?php
/*
 * Created on 03.01.2006
 *
 */
 
class c_executeHandler 
{
    
    var $action;

    function startElement (& $sender, $attrs)
    {
        if (empty($attrs['action']))
        {
            die ("Attribute action is missing in execute tag\n");
        }
        $attrs['tag'] = 'execute';
        $sender->pushParent($attrs);
        $this->action = split('::', $attrs['action']);
        $sender->appendCode('
            $__actionform = new phpinchains_ActionForm($actionform->getArray());'."\n");
    }
    
    function endElement (& $sender)
    {    
        $sender->appendCode('
            $this->dispatcher->setPrintOutput(false);
            $env->setSkipNextCycle(true);'."\n".'$this->dispatcher->callAction('.
            $this->action[0].'\', $__actionform, \''.$this->action[1].'); unset ($__actionform); $this->dispatcher->setPrintOutput(true);'."\n");
        $sender->popParent();
    }

}

?>
